<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>消息节点模块</title>
</head>
<style>
    .dataTB {
        width: 85%;
        border: 1px solid #ccc;
        line-height: 30px;
    }

    .dataTB_Individual {
        margin: 5% auto;
        font-size: 12px;
        height: 30px;
        text-align: center;
    }

    .table_attach th, .table_attach td {
        border: 1px solid #dbdee1;
        color: #202020;
        font-size: 12px;
        font-weight: normal;
        height: 23px;
        line-height: 23px;
        text-align: center;
    }
</style>
<body>
<table class="dataTB dataTB_Individual">
    <thead>
    <tr class="titleTR" style="background-color: #53a4ea;display: table-row;
    vertical-align: inherit; border-color: inherit;border-collapse: collapse;">
        <td class="titleTD">节点名称</td>
        <td class="titleTD"> 电子邮件模版</td>
        <td class="titleTD">短信模板</td>
        <td class="titleTD">站内信模版</td>
        <td class="titleTD">电子邮件状态</td>
        <td class="titleTD">短信状态</td>
        <td class="titleTD">站内信状态</td>
        <td class="titleTD">配置启用状态</td>
        <td class="titleTD"> 操作</td>
    </tr>
    </thead>
    <tbody>
    <!--[{"emailStatus":"1","emailTemplate":"1","id":"1","msgStatus":"1","msgTemplate":"1","smsStatus":"1","smsTemplate":"1","status":"1"}]-->
    <c:forEach items="${messageConfig}" var="mes">
        <tr class="table_attach">
            <td>${mes.id}</td>
            <td><a href="javascript:void(0);"
                   onclick="showEamilTemplate(this)">${mes.emailTemplate}</a></td>
            <td><a href="javascript:void(0);"
                   onclick="showEamilTemplate(this)">${mes.msgTemplate}</a></td>
            <td><a href="javascript:void(0);"
                   onclick="showEamilTemplate(this)">${mes.smsTemplate}</a></td>
            <td><c:if test="${mes.emailStatus==1}">启用</c:if><c:if
                    test="${mes.emailStatus!=1}">禁用</c:if></td>
            <td><c:if test="${mes.smsStatus==1}">启用</c:if><c:if
                    test="${mes.smsStatus!=1}">禁用</c:if></td>
            <td><c:if test="${mes.msgStatus==1}">启用</c:if><c:if
                    test="${mes.msgStatus!=1}">禁用</c:if></td>
            <td><c:if test="${mes.status==1}">启用</c:if><c:if test="${mes.status!=1}">禁用</c:if></td>
            <td><a href="/message/msg-updateMsgPage?id=${mes.id}">编辑</a></td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
<script type="text/javascript"
        src="<s:url value="/js/jquery/combobox/jquery.min-1.10.2.js"/>"></script>
<script type="text/javascript">
    var isShow = false;
    function showEamilTemplate(e) {
        var parentRow = $(e).parent().parent();
        if (isShow) {   //
            parentRow.next().remove();
            isShow = false;
        } else {
            parentRow.after('<tr  class="table_attach"><td colspan="9"><div>After</div></td></tr>');
            isShow = true;
        }

    }
</script>

</html>
